package com.xiangyi.teachingsystem.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.sql.Timestamp;

@Data
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PrivateRes {
    //私有资源标识id
    @NotNull(message = "id不能为空")
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    //用户标识
    @NotNull(message = "用户userId不能为空")
    private Integer userId;
    //资源名称
    private String resName;
    //资源地址
    private String resAddress;
    //资源学科
    private String resSub;
    //资源专业
    private String resMajor;
    //资源课程
    private String resCourse;
    //资源上传时间
    private Timestamp gmtCreate;

    private String resSize;

    private Boolean publicSign;

    @TableField(exist = false)
    private String name;

    @TableField(exist = false)
    private String headUrl;
}
